'use strict';

const Controller = require('egg').Controller;

class IndexController extends Controller {
    async index() {
        const { ctx } = this;
        var data = {
            active: 1
        }
        data.databaseCollection = await ctx.service.wx.databaseCollectionGet();

        await ctx.render('entry', {...data });
    }
    async get() {
        const { ctx } = this;
        ctx.body = {
            code: 10000,
            data: await ctx.model.Content.findAll({})
        }

    }
}

module.exports = IndexController;